<?php

defined('BASEPATH') OR exit('No direct script access allowed');

class MY_Service {

    protected $_nowTime;

    public function __construct() {
        // log_message('debug', "Service Class Initialized");
        $this->_nowTime = time();
    }

    function __get($key) {
        $CI = & get_instance();
        return $CI->$key;
    }

    /**
     * 返回参数
     * @param string $msg
     * @param int $code
     * @param array $data
     * @return array
     */
    protected function response($msg = '', $code = 1, $data = []) {
        return [
            'code' => $code,
            'msg' => $msg,
            'data' => $data
        ];
    }

}
